package homework;

import java.util.Scanner;

public class Test {
    public static void main(String[] args) {
        System.out.println("请选择想要制作的披萨（1.培根披萨 2.海鲜披萨）:");
        Scanner scan = new Scanner(System.in);
        int flag = scan.nextInt();

        if (flag == 1){
            BaconPizza baconPizza = new BaconPizza();
            System.out.println("请输入培根克数");
            baconPizza.setNum(scan.nextInt());
            System.out.println("请输入披萨大小");
            baconPizza.size = scan.nextInt();
            System.out.println("请输入披萨价格");
            baconPizza.price = scan.nextInt();
            baconPizza.show();
        }else if(flag == 2){
            SeaFoodPizza seaFoodPizza = new SeaFoodPizza();
            System.out.println("请输入配料信息:");
            seaFoodPizza.setPeiliao(scan.next());
            System.out.println("请输入披萨大小");
            seaFoodPizza.size = scan.nextInt();
            System.out.println("请输入披萨价格");
            seaFoodPizza.price = scan.nextInt();
            seaFoodPizza.show();
        }else {
            System.out.println("输入错误");
            return;
        }


    }
}
